package com.gimi.cloud.jimi.app.consumer.feign;

import com.gimi.cloud.jimi.dto.user.UserDTO;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by shazhiwei on 2017/10/17.
 */
@FeignClient(name = "jimi-app-service")
public interface RegisterFeignService {

    /**
     * 用户登录(密码登录)
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/doLoginByPassword", method = RequestMethod.POST)
    String doLoginByPassword(@RequestBody UserDTO userDTO);

    /**
     * 验证码登录
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/doLoginByPwdCode", method = RequestMethod.POST)
    String doLoginByPwdCode(@RequestBody UserDTO userDTO);

    /**
     * 修改密码
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/modifyPassword", method = RequestMethod.POST)
    String modifyPwd(@RequestBody UserDTO userDTO);

    /**
     * 初始化密码
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/initPassword", method = RequestMethod.POST)
    String initPassword(UserDTO userDTO);

    /**
     * 获取初始化密码的验证码验证
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/checkModifypassword", method = RequestMethod.POST)
    String checkModifypassword(UserDTO userDTO);

    /**
     * 获取修改密码的验证码验证
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/modifyPasswordByPwdcode", method = RequestMethod.POST)
    String modifyPasswordByPwdcode(UserDTO userDTO);
}
